﻿<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <link rel='shortcut icon' type='image/x-icon' href='favicon.ico' />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="theme-color" content="#000000">
    <title>JS Viewer</title>


    <link href="jsviewer.min.css" rel="stylesheet" />
    <link href="index.css" rel="stylesheet">
</head>

<body onload="loadViewer()">
    <button onclick="loadViewer()">刷新</button>

    <input type="text" id="pname" name="pname" value="name">
    <input type="text" id="psex" name="psex" value="sex">
    <input type="text" id="phisno" name="phisno" value="0123456789">

    <input type="text" id="methodName" name="methodName" value="GetAsync">


    <div style="width: 100%; overflow-x: hidden">
        <div style="float:right;width:100%" id="viewerContainer">
        </div>
    </div>

    <script type="text/javascript" src="jsviewer.min.js"></script>

    <script type="text/javascript">

        let viewer;

        function loadViewer() {


            let valuepname = document.getElementById("pname").value;

            let valuepsex = document.getElementById("psex").value;

             let valuephisno = document.getElementById("phisno").value;

            let valuemethodName = document.getElementById("methodName").value;


            viewer = GrapeCity.ActiveReports.JSViewer.create({
                element: '#viewerContainer'
                // reportParameters: [{ name: 'patientname', values: ['测试患者'] }, { name: 'patientSex', values: ['女'] }, { name: 'patienthisno', values: ['0123456789'] }]

            });
            // viewer.openReport('triage22.rdlx');
   // viewer.openReport('triage22.rdlx', [{ name: 'patientname', values: [valuepname] }, { name: 'patientSex', values: ['女'] }, { name: 'patienthisno', values: ['0123456789'] }]);
    //viewer.openReport('triage22.rdlx', [{ name: 'patientname', values: '默认值' }, { name: 'patientSex', values: ['女'] }, { name: 'patienthisno', values: ['00562'] }, { name: 'methodname', values: ['GetAllAsync'] }]);
     viewer.openReport('triage22.rdlx', [{ name: 'patientname', values: [valuepname] }, { name: 'patientSex', values: [valuepsex] }, { name: 'patienthisno', values: [valuephisno] }, { name: 'methodname', values: [valuemethodName] }]);

     }

    //     function fresh() {
    // viewer.openReport('triage22.rdlx', [{ name: 'patientname', values: [valuepname] }, { name: 'patientSex', values: [valuepsex] }, { name: 'patienthisno', values: [valuephisno] }, { name: 'methodname', values: [valuemethodName] }]);

    //     }
    </script>
</body>

</html>